import request from '@/utils/request'

// 获取用户列表
export const apiMdmUserList = (data) => {
  return request({
      url: '/mdm-user/find/search',
      method: 'post',
      data
  })
}
// 新增用户列表
export const apiMdmUserCreate = (data) => {
  return request({
      url: '/mdm-user/create',
      method: 'post',
      data
  })
}
// 修改用户列表
export const apiMdmUserUpdate = (data) => {
  return request({
      url: '/mdm-user/update',
      method: 'post',
      data
  })
}
// 详情
export const apiMdmUserDetail = (id) => {
  return request({
      url: '/mdm-user/find/detail',
      method: 'post',
      data:{
        id
    }
  })
}
// 删除
export const apiMdmUserDelete = (id) => {
  return request({
      url: '/mdm-user/delete',
      method: 'post',
      data:{
        id
      }
  })
}
// 角色下拉框
export const apiRoleList = (data) => {
  return request({
      url: '/mdm-role/find/list',
      method: 'post',
      data
  })
}
// 用户下拉框
export const apiRegisterList = (data) => {
  return request({
      url: '/mdm-staff/find/register/list',
      method: 'post',
      data
  })
}



// 获取角色列表
export const apiRoleSearchList = (data) => {
  return request({
      url: '/mdm-role/find/search',
      method: 'post',
      data
  })
}
// 获取角色树形权限
export const apiRoleMenuList = () => {
  return request({
      url: '/mdm-authority/find/menuList',
      method: 'get'
  })
}
// 新增角色权限
export const apiRoleCreate = (data) => {
  return request({
      url: '/mdm-role/create',
      method: 'post',
      data
  })
}
// 新增角色权限
export const apiRoleUpdate = (data) => {
  return request({
      url: '/mdm-role/update',
      method: 'post',
      data
  })
}
// 删除角色权限
export const apiRoleDelete = (id) => {
  return request({
      url: '/mdm-role/delete',
      method: 'post',
      data:{
        id
      }
  })
}



// 获取菜单列表
export const apiMenuList = (data) => {
  return request({
    url: '/mdm-authority/find/search',
    method: 'post',
    data
  })
}
// 修改菜单
export const apiMenuUpdate = (data) => {
  return request({
    url: '/mdm-authority/update',
    method: 'post',
    data
  })
}



